/*
 * @Author: jiangh1 1141429595@qq.com
 * @Date: 2023-07-14 10:49:49
 * @LastEditors: jiangh1 1141429595@qq.com
 * @LastEditTime: 2023-07-14 16:29:24
 * @FilePath: \react-js-demo\src\api\index.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import axios from 'axios'
import http from '@/http'
import config from "@/config"

class api {
    // 测试
    async rand(params) {
        console.log(config.ApiUrl.rand);
        return await http.post(
            config.ApiUrl.rand,
            params
            ,
            {
                'authorization': "Bearer " + JSON.parse(sessionStorage.getItem("token")),
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        )
    }

}


export default new api()